package com.googlecode.wicketcharts.highcharts.options;

import java.util.List;

/**
 * A series containing of {@link NamedPoint}s.
 * 
 * @see <a
 *      href="http://api.highcharts.com/highcharts#series.data">http://api.highcharts.com/highcharts#series.data</a>
 * @author Tom Hombergs (tom.hombergs@gmail.com)
 * 
 */
public class NamedPointSeriesOptions extends SeriesOptions<NamedPoint> {

	private static final long serialVersionUID = 1L;

	@Override
	public List<NamedPoint> getData() {
		return (List<NamedPoint>) super.getData();
	}

	@Override
	public void setData(List<NamedPoint> data) {
		super.setData(data);
	}

	/**
	 * Adds a point with only a number.
	 * 
	 * @param y
	 *            the number.
	 */
	public void addNumberPoint(Number y) {
		NamedPoint point = new NamedPoint(y);
		addPoint(point);
	}

	/**
	 * Adds a list of point with only numbers.
	 * 
	 * @param values
	 *            the number values to add.
	 */
	public void addNumbers(List<Number> values) {
		for (Number number : values) {
			addNumberPoint(number);
		}
	}

}
